from typing import Optional, List, Dict

from pydantic import BaseModel, Extra


class QueryInfo(BaseModel):
    noid: str
    name: str
    meta_path: str
    start: int
    duration: int


class BackTrackingModel(BaseModel):
    noid: str
    meta_path: str
    query_info: List[QueryInfo]

    class Config:
        extra = Extra.allow


class BacktrackingTask(BaseModel):
    task_id: str
    callback_url: str
    tasks: List[BackTrackingModel]

class DeleteTask(BaseModel):
    task_id: str
    meta_path: str
    noid: str
    delete_ranges: List[List[int]]

# class
